package com.kai.admin.api;

import com.kai.admin.data.SourceUser;
import com.kai.common.data.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * <p>
 * token Api
 * </p>
 *
 * @author weijk
 * @since 2023/7/17
 */
@FeignClient(value = "blog-admin", path = "/feign/token")
public interface TokenApi {

    /**
     * 校验token
     *
     * @param accessToken token
     * @return 用户信息
     */
    @GetMapping("/check")
    Result<SourceUser> checkToken(@RequestParam("accessToken") String accessToken);
}
